#ifndef COMMON_H
#define COMMON_H

// !! definition below is to be included only when header <WinDef.h> is in use, otherwise it can be omitted
// define base platform for application: _68K_ || _MPPC_ || _X86_ || _IA64_ || _AMD64_ || _M_IX86
#define     _X86_

/******************************************************************************
*                       included common librarys
******************************************************************************/
#include <string>
#include <WinDef.h>


/******************************************************************************
*                       constant macros without parameters
******************************************************************************/
#define _ERROR_NOTIFICATION_      1
#define _SYSTEM_NOTIFICATION_     1

#define C_STRING_DELIMITER        '\0'
#define SPACE_FOR_NULL            1U
#define UNNAMED                   ""


/******************************************************************************
*                       macros with parameter(s)
******************************************************************************/
#define ARRAY_SIZE(x)       ( sizeof( (x) )/sizeof( *(x ) ) )



/******************************************************************************
*                       common typedefs
******************************************************************************/
//typedef char                 char_t;
//typedef char                 *pchar_t;
//typedef wchar_t              Wchar_t;
//typedef wchar_t              *pWchar_t;
//typedef signed   char        sint8_t;
//typedef unsigned char        uint8_t;
//                             
//typedef signed   short       sint16_t;
//typedef unsigned short       uint16_t;
//                             
//typedef signed   int         sint32_t;
//typedef unsigned int         uint32_t;
//
//typedef signed   long long   sint64_t;
//typedef unsigned long long   uint64_t;
//
//typedef float                real32_t;
//typedef double               real64_t;
//
//typedef sint32_t             bool_t;
//typedef uint64_t             addr_t;
//typedef void                 void_t;



/******************************************************************************
*                       common enums
******************************************************************************/
const enum FunctionSuccesFailure {
    FUNCTION_UNDEF    =  0,
    FUNCTION_FAILURE  = -1,
    FUNCTION_SUCCESS  =  1,
    FUNCTION_PENDING
};

/******************************************************************************
*                       common function's prototypes
******************************************************************************/
std::string  decToString(const UINT dInput);
std::string  decToHexString(const UINT dInput);
std::wstring stringToWc(const std::string &sInput);
std::string  wcToString(const WCHAR *const wInput);
BOOL isWcSame(const WCHAR *const wcComp_1, const WCHAR *const wcComp_2);
FunctionSuccesFailure copyWCharString(WCHAR *wcDest, UINT const wcDestSize, const WCHAR *const wcSrc);
UINT getPressedKeys();
BOOL isKeyDown(UINT key);


#endif
